package com.zhouyipeng;

import java.math.BigDecimal;

public class BigDecimal0721 {

    public static void main(String[] args) {
        int a = 12;

        int b = 23;

        BigDecimal bdA = new BigDecimal(a);
        BigDecimal bdB = new BigDecimal(b);

        System.out.println(bdA);
        System.out.println(bdB);

        BigDecimal divide =bdA.divide(bdB,4,BigDecimal.ROUND_HALF_UP);
        System.out.println(divide);
        BigDecimal multiply = divide.multiply(new BigDecimal(100));

        System.out.println(multiply);
        System.out.println(multiply.intValue());


    }
}
